package com.xiaohong.seckill;

import entity.IdWorker;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;

/**
 * @author xiaohong
 * @Description
 * @date 2020/10/26 0026 23:35
 */
@SpringBootApplication
@EnableEurekaClient
@MapperScan("com.xiaohong.seckill.dao")
public class SeckillApplication {
    public static void main(String[] args) {
        SpringApplication.run(SeckillApplication.class,args);
    }

    @Bean
    public IdWorker createIdWord(){
        return new IdWorker(1,1);
    }
}
